<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD/ XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/ xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>MessBox</title>
    <link rel="Stylesheet" href="../static/main.css" type="text/css" />
</head>

<body>

    <div id="main">

        <h1>留言板 MessBox</h1>
        <div id="form-area">
            <p>随便写点什么吧！ Comment any here!</p>
            <form action="/post" method="post">
                <table>
                    <tr>
                        <th>昵 称 Name</th>
                        <td>
                            <input type="text" size="20" name="TP_name" />
                        </td>
                    </tr>
                    <tr>
                        <th>留 言 Comment</th>
                        <td>
                            <textarea rows="5" cols="40" name="TP_comment"></textarea>
                        </td>
                    </tr>
                </table>
                <p><button type="submit">上 墙 Commit</button></p>
            </form>
        </div>

        <div id="entries-area">
            <h2>留言记录 The comments history</h2>
            <div class="entry">
                {% for greeting in greeting_list %}
                <h3>{{greeting.NAME}} 评论于 {{greeting.TIME|datetime_fmt}}</h3>
                <p>{{greeting.COMMENT}}</p>
                {% endfor %}
            </div>
        </div>
    </div>

</body>

</html>